package com.ruoyi.system.service.impl;

import com.ruoyi.system.domain.Language;
import com.ruoyi.system.mapper.LanguageMapper;
import com.ruoyi.system.service.ILanguageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 编程语言Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-01-09
 */
@Service
public class LanguageServiceImpl implements ILanguageService 
{
    @Autowired
    private LanguageMapper languageMapper;

    /**
     * 查询编程语言
     * 
     * @param id 编程语言主键
     * @return 编程语言
     */
    @Override
    public Language selectLanguageById(Long id)
    {
        return languageMapper.selectLanguageById(id);
    }

    /**
     * 查询编程语言列表
     * 
     * @param language 编程语言
     * @return 编程语言
     */
    @Override
    public List<Language> selectLanguageList(Language language)
    {
        return languageMapper.selectLanguageList(language);
    }

    /**
     * 新增编程语言
     * 
     * @param language 编程语言
     * @return 结果
     */
    @Override
    public int insertLanguage(Language language)
    {
        return languageMapper.insertLanguage(language);
    }

    /**
     * 修改编程语言
     * 
     * @param language 编程语言
     * @return 结果
     */
    @Override
    public int updateLanguage(Language language)
    {
        return languageMapper.updateLanguage(language);
    }

    /**
     * 批量删除编程语言
     * 
     * @param ids 需要删除的编程语言主键
     * @return 结果
     */
    @Override
    public int deleteLanguageByIds(Long[] ids)
    {
        return languageMapper.deleteLanguageByIds(ids);
    }

    /**
     * 删除编程语言信息
     * 
     * @param id 编程语言主键
     * @return 结果
     */
    @Override
    public int deleteLanguageById(Long id)
    {
        return languageMapper.deleteLanguageById(id);
    }
}
